package com.android.myapplication.main;

import com.android.myapplication.third.greendao.GreenDaoActivity;
import com.android.myapplication.view.BarActivity;
import com.android.myapplication.view.ButtonActivity;
import com.android.myapplication.view.ClockViewActivity;
import com.android.myapplication.view.DatabaseActivty;
import com.android.myapplication.view.ImageViewActivity;
import com.android.myapplication.view.ListActivity;
import com.android.myapplication.view.PermissionsActvity;
import com.android.myapplication.view.RecyclerViewActivity;
import com.android.myapplication.view.StyleActivity;
import com.android.myapplication.view.TextActivity;
import com.android.myapplication.view.media.AudioRecorderActivity;
import com.android.myapplication.view.media.CameraActivity;
import com.android.myapplication.view.media.MediaActivity;
import com.android.myapplication.view.media.SoundPlayActivity;
import com.android.myapplication.view.media.SystemMediaActivity;
import com.android.myapplication.view.media.VideoActivity;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * Helper class for providing sample content for user interfaces created by
 * Android template wizards.
 * <p>
 * TODO: Replace all uses of this class before publishing your app.
 */
public class MainContent {

    /**
     * An array of sample  items.
     */
    public static final List<MainItem> ITEMS = new ArrayList<MainItem>();

    /**
     * A map of sample  items, by ID.
     */
    public static final Map<String, MainItem> ITEM_MAP = new HashMap<String, MainItem>();


    static {
        // Add some sample items.
        addItem(new MainItem("1","基础组件 TextView", "TextView组件", TextActivity.class));
        addItem(new MainItem("2","基础组件 Button", "Button组件", ButtonActivity.class));
        addItem(new MainItem("3","基础组件 ImageView", "ImageView组件", ImageViewActivity.class));
        addItem(new MainItem("4","基础组件 Bar", "ProgressBar 进度条\n" +
                "SeekBar 拖动条\n" +
                "RatingBar  星级评分条\n" , BarActivity.class));
        addItem(new MainItem("5","样式和风格", "样式和风格" , StyleActivity.class));
        addItem(new MainItem("6","ListView", "ListView" , ListActivity.class));
        addItem(new MainItem("7","RecyclerView", "RecyclerView" , RecyclerViewActivity.class));
        addItem(new MainItem("8","自定义View", "自定义View，钟表" , ClockViewActivity.class));
        addItem(new MainItem("10","多分辨率适配", "多分辨率适配" , ClockViewActivity.class));
        addItem(new MainItem("11","数据持久化", "数据持久化" , DatabaseActivty.class));
        addItem(new MainItem("12","GreenDao", "GreenDao" , GreenDaoActivity.class));
        addItem(new MainItem("13","权限", "权限" , PermissionsActvity.class));
        addItem(new MainItem("14","音乐", "音乐播放器" , MediaActivity.class));
        addItem(new MainItem("15","录音", "录音" , AudioRecorderActivity.class));
        addItem(new MainItem("16","短音效", "短音效" , SoundPlayActivity.class));
        addItem(new MainItem("17","视频播放", "视频播放" , VideoActivity.class));
        addItem(new MainItem("18","系统拍照和录制视频", "系统拍照和录制视频" , SystemMediaActivity.class));
        addItem(new MainItem("19","拍照", "拍照" , CameraActivity.class));




    }

    private static void addItem(MainItem item) {
        ITEMS.add(item);
        ITEM_MAP.put(item.id, item);
    }



    /**
     * A dummy item representing a piece of content.
     */
    public static class MainItem {
        public final String id;
        public final String content;
        public final String details;
        public final Class activity;

        public MainItem(String id, String content, String details, Class activity) {
            this.id = id;
            this.content = content;
            this.details = details;
            this.activity = activity;
        }

        @Override
        public String toString() {
            return content;
        }
    }
}
